package com.spddr.pmos.cxf.tree.impl;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;


import org.springframework.stereotype.Service;

import com.spddr.pmos.cxf.tree.JaxrsOrgTree;
import com.spddr.pmos.jpa.Company;

import cn.seqdata.pojo.TreeNode;

@Service
public class JaxrsOrgTreeImpl extends AbstractTreeImpl implements JaxrsOrgTree {

	@Override
	public Collection<TreeNode> byRoot() {
		List<TreeNode> nodes = new ArrayList<>();
		Company company = companyRepos.findOne(1000000L);
		nodes.addAll(byJpaObject(true, Arrays.asList(company)));
		return nodes;
	}
}
